/*
 * @Author: weidewei
 * @Date: 2025-10-21 09:51:33
 * @LastEditors: weidewei
 * @LastEditTime: 2025-10-21 09:59:43
 * @Description: 
 * @FilePath: \2025-front-face\vite-react-ts-template\src\pages\login.tsx
 */
import { useNavigate } from 'react-router-dom';

import { Button } from 'antd';

const Login = () => {
  const navigation = useNavigate();
   const handleLogin = () => {
    try {
      navigation('/user');
    } catch (error) {
      console.error('Navigation error:', error);
    }
  };
  return (
    <div>
      <Button type="primary" onClick={() => handleLogin}>
        登录
      </Button>
    </div>
  );
};

export default Login;
